Skip to content

fix(restore): restore 9 deleted files from git history - #189

Merged
KooshaPari merged 1 commit into
mainfrom
fix/restore-missing-files
Jul 2, 2026
Merged

KooshaPari merged 1 commit into
mainfrom
fix/restore-missing-files

Conversation

@KooshaPari

Copy link
Copy Markdown
Owner

Restored all missing files that were found in git history:

Restored (9 files):

  • src/lib/logPayloads.ts
  • src/shared/utils/apiKey.ts
  • src/shared/constants/batchEndpoints.ts
  • src/shared/constants/modelCompat.ts
  • src/lib/api/errorResponse.ts
  • open-sse/utils/cors.ts
  • open-sse/services/wildcardRouter.ts
  • src/lib/db/reasoningCache.ts
  • src/lib/db/compressionCacheStats.ts

Already present on main:

  • src/lib/combos/steps.ts (exists in origin/main, no restore needed)

All files verified from commit history and restored to current state.

Restored from previous commits:
- src/lib/logPayloads.ts (from 39a6ba8)
- src/shared/utils/apiKey.ts (from 78f09c8)
- src/shared/constants/batchEndpoints.ts (from 2e68c0a)
- src/shared/constants/modelCompat.ts (from 39a6ba8)
- src/lib/api/errorResponse.ts (from 2e68c0a)
- open-sse/utils/cors.ts (from 39a6ba8)
- open-sse/services/wildcardRouter.ts (from 39a6ba8)
- src/lib/db/reasoningCache.ts (from 39a6ba8)
- src/lib/db/compressionCacheStats.ts (from 507842c)

All files verified in git history and restored to current state.
src/lib/combos/steps.ts already exists on main (not a deletion).
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@KooshaPari
KooshaPari merged commit 68b1218 into main Jul 2, 2026
10 of 23 checks passed
@KooshaPari
KooshaPari deleted the fix/restore-missing-files branch July 2, 2026 08:23
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@KooshaPari, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 993b1aa0-b51b-46db-902d-1e38ea575b8c

📥 Commits

Reviewing files that changed from the base of the PR and between fa570b2 and b5a6d8d.

📒 Files selected for processing (9)
  • open-sse/services/wildcardRouter.ts
  • open-sse/utils/cors.ts
  • src/lib/api/errorResponse.ts
  • src/lib/db/compressionCacheStats.ts
  • src/lib/db/reasoningCache.ts
  • src/lib/logPayloads.ts
  • src/shared/constants/batchEndpoints.ts
  • src/shared/constants/modelCompat.ts
  • src/shared/utils/apiKey.ts

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "review"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/restore-missing-files

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

L17 Latency Budget Report

--- Latency Budget Summary ---
  Total endpoints checked: 0
  Passed: 0
  Warnings: 0
  Failures: 0

Checked against: budgets/rest-endpoints.yaml.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5a6d8d3a9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

export function recordCacheStats(entry: CacheStatsEntry): void {
const db = getDbInstance();

const sql = `INSERT INTO compression_cache_stats (

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore the compression_cache_stats schema

This restored DB module assumes compression_cache_stats already exists, but the commit does not restore a migration/table definition for it; checking src/lib/db/core.ts and src/lib/db/migrations shows no CREATE TABLE for this table. On a fresh or upgraded DB, the chat compression hook drops every stats write with no such table, and getCacheStatsSummary() callers such as the MCP compression tool can fail outright, so the matching migration needs to be restored with the module.

Useful? React with 👍 / 👎.

Comment on lines +92 to +94
`INSERT OR REPLACE INTO reasoning_cache
(tool_call_id, provider, model, reasoning, char_count, created_at, expires_at)
VALUES (?, ?, ?, ?, ?, datetime('now'), ?)`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore the reasoning_cache schema

This module now writes to reasoning_cache, but the current schema/migration set does not create that table; a repo search under src/lib/db/core.ts and src/lib/db/migrations finds references but no CREATE TABLE. In new deployments, setReasoningCache() throws and the service swallows it, leaving reasoning replay only in memory and making dashboard stats/entries empty after a restart, so the table migration needs to be restored as part of this change.

Useful? React with 👍 / 👎.

Comment on lines +50 to +52
message: typeof anyError?.message === "string" ? anyError.message : fallbackMessage,
type: anyError?.type,
details: anyError?.details,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Sanitize unknown errors before returning them

When routes catch an internal exception and call createErrorResponseFromUnknown() (for example the proxy/deploy settings routes), this path returns error.message and error.details verbatim to the client. For 5xx unknown errors those strings can contain stack frames, local paths, upstream response bodies, or credentials, so this helper should use the existing sanitized error body/message path or fall back to the supplied generic message instead of echoing raw exception fields.

Useful? React with 👍 / 👎.

@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant